From: Sebastian Keller Date: Wed, 17 Feb 2021 00:00:27 +0000 (+0100) Subject: dnd: Also consider indirect scaling of dnd actor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~315 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a24a16c5ac35c08990f483b0b9575f1581b6fcfb;p=gnome-shell.git dnd: Also consider indirect scaling of dnd actor Some actors don't have the scale applied to them directly but are children of a scaled parent. In those case just retaining the scale will not be enough and the scale of the actor itself needs to be adjusted when reparenting. This could for example be seen when dragging windows from the workspace thumbnails. Part-of: --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 6b4a98382..0e972a13d 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -400,6 +400,9 @@ var _Draggable = class _Draggable { scaledWidth = transformedExtents.get_width(); scaledHeight = transformedExtents.get_height(); + this._dragActor.scale_x = scaledWidth / this._dragOrigWidth; + this._dragActor.scale_y = scaledHeight / this._dragOrigHeight; + this._dragOrigParent.remove_actor(this._dragActor); Main.uiGroup.add_child(this._dragActor); Main.uiGroup.set_child_above_sibling(this._dragActor, null);